#define  _CRT_SECURE_NO_WARNINGS
#include "BinaryTree.h"
#include <string.h>
void Test1()
{
	char ch[] = "ABD##E#H##CF##G##";
	int i = 0;
	BTNode* root = BinaryTreeCreate(ch, strlen(ch), &i);
	printf("size :%d \n", BinaryTreeSize(root));
	printf("leaf :%d \n", BinaryTreeLeafSize(root));
	printf("level 1 :%d \n", BinaryTreeLevelKSize(root, 1));
	printf("level 2 :%d \n", BinaryTreeLevelKSize(root, 2));
	printf("level 3 :%d \n", BinaryTreeLevelKSize(root, 3));
	printf("level 4 :%d \n", BinaryTreeLevelKSize(root, 4));
	printf("level 5 :%d \n", BinaryTreeLevelKSize(root, 5));
	printf("find A : %p \n", BinaryTreeFind(root, 'A'));
	printf("find G : %p \n", BinaryTreeFind(root, 'G'));
	printf("find I : %p \n", BinaryTreeFind(root, 'I'));
	BinaryTreePrevOrder(root); printf("\n");
	BinaryTreeInOrder(root); printf("\n");
	BinaryTreePostOrder(root); printf("\n");
	BinaryTreeLevelOrder(root); printf("\n");
	printf("Complete : %d\n", BinaryTreeComplete(root));
	BinaryTreeDestory(&root);
	char ch1[] = "AB##C##";
	i = 0;
	root = BinaryTreeCreate(ch1, strlen(ch1), &i);

	printf("Complete : %d\n", BinaryTreeComplete(root));
	BinaryTreeDestory(&root);
}

int main()
{
	Test1();
	return 0;
}